home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS04.ADF / Asm / prtbase.i < prev   
Text File  |  1985-12-04  |  6KB  |  158 lines

  1.  
  2. **********************************************************************
  3. *                                                                    *
  4. *   Copyright 1985, Commodore-Amiga Inc.   All rights reserved.      *
  5. *   No part of this program may be reproduced, transmitted,          *
  6. *   transcribed, stored in retrieval system, or translated into      *
  7. *   any language or computer language, in any form or by any         *
  8. *   means, electronic, mechanical, magnetic, optical, chemical,      *
  9. *   manual or otherwise, without the prior written permission of     *
  10. *   Commodore-Amiga Incorporated, 983 University Ave. Building #D,   *
  11. *   Los Gatos, California, 95030                                     *
  12. *                                                                    *
  13. **********************************************************************
  14. *
  15. *       printer device data definition
  16. *
  17. **********************************************************************
  18.  
  19.         IFND    DEVICES_PRTBASE_I
  20. DEVICES_PRTBASE_I       EQU     1
  21.  
  22.         IFND    EXEC_NODES_I
  23.         INCLUDE "exec/nodes.i"
  24.         ENDC
  25.         IFND    EXEC_LISTS_I
  26.         INCLUDE "exec/lists.i"
  27.         ENDC
  28.         IFND    EXEC_PORTS_I
  29.         INCLUDE "exec/ports.i"
  30.         ENDC
  31.         IFND    EXEC_LIBRARIES_I
  32.         INCLUDE "exec/libraries.i"
  33.         ENDC
  34.         IFND    EXEC_TASKS_I
  35.         INCLUDE "exec/tasks.i"
  36.         ENDC
  37.  
  38.         IFND    DEVICES_PARALLEL_I
  39.         INCLUDE "devices/parallel.i"
  40.         ENDC
  41.         IFND    DEVICES_SERIAL_I
  42.         INCLUDE "devices/serial.i"
  43.         ENDC
  44.         IFND    DEVICES_TIMER_I
  45.         INCLUDE "devices/timer.i"
  46.         ENDC
  47.         IFND    LIBRARIES_DOSEXTENS_I
  48.         INCLUDE "libraries/dosextens.i"
  49.         ENDC
  50.         IFND    INTUITION_INTUITION_I
  51.         INCLUDE "intuition/intuition.i"
  52.         ENDC
  53.  
  54.  
  55.  STRUCTURE      DeviceData,LIB_SIZE
  56.     APTR        dd_Segment      ; A0 when initialized
  57.     APTR        dd_ExecBase     ; A6 for exec
  58.     APTR        dd_CmdVectors   ; command table for device commands
  59.     APTR        dd_CmdBytes     ; bytes describing which command queue
  60.     UWORD       dd_NumCommands  ; the number of commands supported
  61.     LABEL       dd_SIZEOF
  62.  
  63.  
  64. *------
  65. *------ device driver private variables ------------------------------
  66. *------
  67. du_Flags        EQU     LN_PRI  ; various unit flags
  68.  
  69. ;------ IO_FLAGS
  70.     BITDEF      IO,QUEUED,4     ; command is queued to be performed
  71.     BITDEF      IO,CURRENT,5    ; command is being performed
  72.     BITDEF      IO,SERVICING,6  ; command is being actively performed
  73.     BITDEF      IO,DONE,7       ; command is done
  74.  
  75. ;------ du_Flags
  76.     BITDEF      DU,STOPPED,0    ; commands are not to be performed
  77.  
  78.  
  79. *------ Constants ----------------------------------------------------
  80. P_PRIORITY      EQU     0
  81. P_STKSIZE       EQU     $800
  82.  
  83. *------ pd_Flags ------
  84.         BITDEF  P,IOR0,0        ; IOR0 is in use
  85.         BITDEF  P,IOR1,1        ; IOR1 is in use
  86.         BITDEF  P,EXPUNGED,7    ; device to be expunged when all closed
  87.  
  88.  STRUCTURE      PrinterData,dd_SIZEOF
  89.     STRUCT      pd_Unit,MP_SIZE         ; the one and only unit
  90.     BPTR        pd_PrinterSegment       ; the printer specific segment
  91.     UWORD       pd_PrinterType          ; the segment printer type
  92.     APTR        pd_SegmentData          ; the segment data structure
  93.     APTR        pd_PrintBuf             ; the raster print buffer
  94.     APTR        pd_PWrite               ; the parallel write function
  95.     APTR        pd_PBothReady           ; the parallel write function's done
  96.  
  97.     IFGT        IOEXTPar_SIZE-IOEXTSER_SIZE
  98.     STRUCT      pd_IOR0,IOEXTPar_SIZE   ; port I/O request 0
  99.     STRUCT      pd_IOR1,IOEXTPar_SIZE   ;   and 1 for double buffering
  100.     ENDC
  101.  
  102.     IFLE        IOEXTPar_SIZE-IOEXTSER_SIZE
  103.     STRUCT      pd_IOR0,IOEXTSER_SIZE   ; port I/O request 0
  104.     STRUCT      pd_IOR1,IOEXTSER_SIZE   ;   and 1 for double buffering
  105.     ENDC
  106.  
  107.     STRUCT      pd_TIOR,IOTV_SIZE       ; timer I/O request
  108.     STRUCT      pd_IORPort,MP_SIZE      ;   and message reply port
  109.     STRUCT      pd_TC,TC_SIZE           ; write task
  110.     STRUCT      pd_Stk,P_STKSIZE        ;   and stack space
  111.     UBYTE       pd_Flags                ; device flags
  112.     UBYTE       pd_pad
  113.     STRUCT      pd_Preferences,pf_SIZEOF ; the latest preferences
  114.     LABEL       pd_SIZEOF               ; warning! this may be odd
  115.  
  116.     BITDEF      PPC,GFX,0
  117.     BITDEF      PPC,COLOR,1
  118.  
  119. PPC_BWALPHA     EQU     0
  120. PPC_BWGFX       EQU     1
  121. PPC_COLORGFX    EQU     3
  122.  
  123. PCC_BW          EQU     1
  124. PCC_YMC         EQU     2
  125. PCC_YMC_BW      EQU     3
  126. PCC_YMCB        EQU     4
  127.  
  128.  STRUCTURE      PrinterExtendedData,0
  129.     APTR    ped_PrinterName     ; printer name, null terminated
  130.     APTR    ped_Init            ; called after LoadSeg
  131.     APTR    ped_Expunge         ; called before UnLoadSeg
  132.     APTR    ped_Open            ; called at OpenDevice
  133.     APTR    ped_Close           ; called at CloseDevice
  134.     UBYTE   ped_PrinterClass    ; printer class
  135.     UBYTE   ped_ColorClass      ; color class
  136.     UBYTE   ped_MaxColumns      ; number of print columns available
  137.     UBYTE   ped_NumCharSets     ; number of character sets
  138.     UWORD   ped_NumRows         ; number of raster rows in a raster dump
  139.     ULONG   ped_MaxXDots        ; number of dots maximum in a raster dump
  140.     ULONG   ped_MaxYDots        ; number of dots maximum in a raster dump
  141.     UWORD   ped_XDotsInch       ; horizontal dot density
  142.     UWORD   ped_YDotsInch       ; vertical dot density
  143.     APTR    ped_Commands        ; printer text command table
  144.     APTR    ped_DoSpecial       ; special command handler
  145.     APTR    ped_Render          ; raster render function
  146.     LONG    ped_TimeoutSecs     ; good write timeout
  147.     LABEL   ped_SIZEOF
  148.  
  149.  STRUCTURE      PrinterSegment,0
  150.     ULONG   ps_NextSegment      ; (actually a BPTR)
  151.     ULONG   ps_runAlert         ; MOVEQ #0,D0 : RTS
  152.     UWORD   ps_Version          ; segment version
  153.     UWORD   ps_Revision         ; segment revision
  154.     LABEL   ps_PED              ; printer extended data
  155.  
  156.         ENDC
  157.  
  158.